﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using JM.JCY.Common;
using NCS.IConnect.PolicyInjection.CallHandlers;
using JM.JCY.BusinessComponent;
using JM.JCY.BusinessEntity;
using JM.JCY.DataAccess;
namespace JM.JCY.BusinessFacade
{
    public class ApplicationBF : JCYBusinessFacadeBase<ApplicationBC>,IApplication
    {
        public ApplicationBF()
            : base(new ApplicationBC())
        {
        }

        public ApplicationDataSet.T_ApplicationDataTable GetApplicationByName(string appName)
        {
            return this.BusinessComponent.GetApplicationByName(appName);
        }

        public ApplicationDataSet.T_ApplicationDataTable GetApplicationByType(string appType, string isVisble)
        {
            return BusinessComponent.GetApplicationByType(appType, isVisble);
        }

        public ApplicationDataSet.T_ApplicationDataTable GetApplicationNameById(int appId)
        {
            return this.BusinessComponent.GetApplicationNameById(appId);
        }







        public ApplicationDataSet.T_ApplicationRoleDataTable GetApplicationRoleByUserName(string userName)
        {
            return this.BusinessComponent.GetApplicationRoleByUserName(userName);
        }

        public ApplicationDataSet.T_ApplicationRoleDataTable GetApplicationRoleByAppId(int appId)
        {
            return this.BusinessComponent.GetApplicationRoleByAppId(appId);
        }

        public void DeleteApplicationRoleByAppId(int appId)
        {
            this.BusinessComponent.DeleteApplicationRoleByAppId(appId);
        }

        public void CreateApplicationRole(ApplicationDataSet.T_ApplicationRoleDataTable dt)
        {
            this.BusinessComponent.CreateApplicationRole(dt);
        }
    }
}
